import { SUPPLIER_TYPE_SELECT_LIST } from '@supplier/constants/common';

const FORM_ITEM_LIST = [
  // monthEnd monthStart
  {
    prop: 'month',
    label: '月份',
    type: 'monthrange',
  },
  {
    prop: 'supplierCode',
    label: '供应商代码',
    type: 'input'
  },
  {
    prop: 'supplierName',
    label: '供应商名称',
    type: 'input'
  },
  {
    prop: 'supplierType',
    label: '供应商类型',
    type: 'select',
    clearable: true,
    options: SUPPLIER_TYPE_SELECT_LIST,
  },
  {
    prop: 'managementAreaId',
    label: '管理区域',
    type: 'managementArea'
  },
  {
    prop: 'belongDepartmentId',
    label: '归属中心',
    type: 'select',
    filterable: true,
    dict: 233,
  },
  {
    prop: 'cooperativeClassify',
    label: '合作关系',
    type: 'select',
    filterable: true,
    sysDict: 10158
  },
  {
    prop: 'businessContactName',
    label: '业务对接人',
    type: 'input'
  },
]
// 表头
const TABLE_COLUMNS = [
  {
    title: '月份',
    key: 'month'
  },
  {
    title: '供应商代码',
    key: 'supplierCode'
  },
  {
    title: '供应商名称',
    key: 'supplierName',
  },
  {
    title: '供应商类型',
    key: 'supplierTypeName',
  },
  {
    title: '供应商管理区域',
    key: 'managementAreaName',
  },
  {
    title: '归属中心',
    key: 'belongDepartmentName',
  },
  {
    title: '合作关系',
    key: 'cooperativeClassifyName',
  },
  {
    title: '业务对接人',
    key: 'businessContactName',
  },
  {
    title: '资质/样品能力',
    key: 'qualificationAndSampleDelay',
    children: [
      {
        title: '资质、样品未按时按质提供次数',
        key: 'qualificationAndSampleDelayCount',
      },
      {
        title: '得分',
        key: 'qualificationAndSampleDelayScore',
      },
    ]
  },
  {
    title: '报价及时率能力',
    key: 'timely',
    children: [
      {
        title: '报价及时率',
        key: 'timelyQuotationRate',
      },
      {
        title: '得分',
        key: 'timelyQuotationScore',
      },
    ]
  },
  {
    title: '是否协同能力',
    key: 'isSynergy',
    children: [
      {
        title: '是否协同',
        key: 'synergyName',
      },
      {
        title: '得分',
        key: 'synergyScore',
      },
    ]
  },
  {
    title: '信用风险能力',
    key: 'risk',
    children: [
      {
        title: '是否纳入政府失信名单',
        key: 'includedInGovernmentDishonestyName',
      },
      {
        title: '得分',
        key: 'governmentDishonestyScore',
      },
      {
        title: '经营或者诉讼风险次数',
        key: 'businessOrLitigationRiskCount',
      },
      {
        title: '得分',
        key: 'businessOrLitigationRiskScore',
      },
    ]
  },
  {
    title: '评级',
    key: 'rating',
  },
]
export {
  FORM_ITEM_LIST,
  TABLE_COLUMNS,
}
